import React from 'react'

import { createFromIconfontCN } from '@ant-design/icons'

const IconFont = createFromIconfontCN({
  scriptUrl: '//at.alicdn.com/t/font_2427972_x4rendyln3s.js'
})

export function getSocialIcon(type) {
  switch (type) {
    case '微信':
      return <IconFont className="icon" type="icon-weixin" />
    case '微博':
      return <IconFont className="icon" type="icon-shejiaotubiao-42" />
    case 'QQ':
      return <IconFont className="icon" type="icon-QQ" />
    case 'Github':
      return <IconFont className="icon" type="icon-github" />
    case 'Gitee':
      return <IconFont className="icon" type="icon-Gitee" />
    case '掘金':
      return <IconFont className="icon" type="icon-juejin" />
    case '简书':
      return <IconFont className="icon" type="icon-yanzheng-jianshu-copy" />
    case 'CSDN':
      return <IconFont className="icon" type="icon-csdn" />
    case 'bilibili':
      return <IconFont className="icon" type="icon-bilibili" />
    case '支付宝':
      return <IconFont className="icon" type="icon-zhifubao" />
    case '钉钉':
      return <IconFont className="icon" type="icon-dingding-copy" />
    default:
      return null
  }
}
